/*
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-07-22 15:13:55
 * @LastEditors: XiaoGuo185 2721391057@qq.com
 * @LastEditTime: 2022-07-25 15:16:59
 * @FilePath: \dw\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
export default new Router({
  //去掉url上的#
  mode: 'history',
  base:process.env.VUE_APP_BASE_Title,
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: resolve => require(['../components/Login.vue'], resolve),
    },
    {
      path: '/list',
      name: 'List',
      component: resolve => require(['../components/Table/table.vue'], resolve),
    },
    {
      path: '/index',
      name: 'index',
      component: resolve => require(['../components/index.vue'], resolve),
    },
    {
      path: '/register',
      name: 'register',
      component: resolve => require(['../components/register.vue'], resolve),
    },
  ]
})
